{"id":"R2GC","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/forkJoin.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/observable/forkJoin.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":"tslib","loc":{"line":2,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/forkJoin.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/tslib/tslib.es6.js"},{"name":"../Observable","loc":{"line":3,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/forkJoin.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Observable.js"},{"name":"../util/isArray","loc":{"line":4,"column":24},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/forkJoin.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/isArray.js"},{"name":"./empty","loc":{"line":5,"column":22},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/forkJoin.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/empty.js"},{"name":"../util/subscribeToResult","loc":{"line":6,"column":34},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/forkJoin.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/subscribeToResult.js"},{"name":"../OuterSubscriber","loc":{"line":7,"column":32},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/forkJoin.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/OuterSubscriber.js"},{"name":"../operators/map","loc":{"line":8,"column":20},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/observable/forkJoin.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/map.js"}],"generated":{"js":"\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.forkJoin=a;var e=s(require(\"tslib\")),r=require(\"../Observable\"),t=require(\"../util/isArray\"),i=require(\"./empty\"),n=require(\"../util/subscribeToResult\"),u=require(\"../OuterSubscriber\"),o=require(\"../operators/map\");function s(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,t):{};i.get||i.set?Object.defineProperty(r,t,i):r[t]=e[t]}return r.default=e,r}function a(){for(var e,n=[],u=0;u(sources: [ObservableInput]): Observable;\nexport function forkJoin(sources: [ObservableInput, ObservableInput]): Observable<[T, T2]>;\nexport function forkJoin(sources: [ObservableInput, ObservableInput, ObservableInput]): Observable<[T, T2, T3]>;\nexport function forkJoin(sources: [ObservableInput, ObservableInput, ObservableInput, ObservableInput]): Observable<[T, T2, T3, T4]>;\nexport function forkJoin(sources: [ObservableInput, ObservableInput, ObservableInput, ObservableInput, ObservableInput]): Observable<[T, T2, T3, T4, T5]>;\nexport function forkJoin(sources: [ObservableInput, ObservableInput, ObservableInput, ObservableInput, ObservableInput, ObservableInput]): Observable<[T, T2, T3, T4, T5, T6]>;\nexport function forkJoin(sources: Array>): Observable;\n\n// forkJoin(a$, b$, c$)\nexport function forkJoin(v1: ObservableInput): Observable;\nexport function forkJoin(v1: ObservableInput, v2: ObservableInput): Observable<[T, T2]>;\nexport function forkJoin(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput): Observable<[T, T2, T3]>;\nexport function forkJoin(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput): Observable<[T, T2, T3, T4]>;\nexport function forkJoin(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput): Observable<[T, T2, T3, T4, T5]>;\nexport function forkJoin(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput): Observable<[T, T2, T3, T4, T5, T6]>;\n\n/** @deprecated resultSelector is deprecated, pipe to map instead */\nexport function forkJoin(...args: Array|Function>): Observable;\nexport function forkJoin(...sources: ObservableInput[]): Observable;\n/* tslint:enable:max-line-length */\n\n/**\n * Joins last values emitted by passed Observables.\n *\n * Wait for Observables to complete and then combine last values they emitted.\n *\n * ![](forkJoin.png)\n *\n * `forkJoin` is an operator that takes any number of Observables which can be passed either as an array\n * or directly as arguments. If no input Observables are provided, resulting stream will complete\n * immediately.\n *\n * `forkJoin` will wait for all passed Observables to complete and then it will emit an array with last\n * values from corresponding Observables. So if you pass `n` Observables to the operator, resulting\n * array will have `n` values, where first value is the last thing emitted by the first Observable,\n * second value is the last thing emitted by the second Observable and so on. That means `forkJoin` will\n * not emit more than once and it will complete after that. If you need to emit combined values not only\n * at the end of lifecycle of passed Observables, but also throughout it, try out {@link combineLatest}\n * or {@link zip} instead.\n *\n * In order for resulting array to have the same length as the number of input Observables, whenever any of\n * that Observables completes without emitting any value, `forkJoin` will complete at that moment as well\n * and it will not emit anything either, even if it already has some last values from other Observables.\n * Conversely, if there is an Observable that never completes, `forkJoin` will never complete as well,\n * unless at any point some other Observable completes without emitting value, which brings us back to\n * the previous case. Overall, in order for `forkJoin` to emit a value, all Observables passed as arguments\n * have to emit something at least once and complete.\n *\n * If any input Observable errors at some point, `forkJoin` will error as well and all other Observables\n * will be immediately unsubscribed.\n *\n * Optionally `forkJoin` accepts project function, that will be called with values which normally\n * would land in emitted array. Whatever is returned by project function, will appear in output\n * Observable instead. This means that default project can be thought of as a function that takes\n * all its arguments and puts them into an array. Note that project function will be called only\n * when output Observable is supposed to emit a result.\n *\n * ## Examples\n * ### Use forkJoin with operator emitting immediately\n * ```javascript\n * import { forkJoin, of } from 'rxjs';\n *\n * const observable = forkJoin(\n * of(1, 2, 3, 4),\n * of(5, 6, 7, 8),\n * );\n * observable.subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('This is how it ends!'),\n * );\n *\n * // Logs:\n * // [4, 8]\n * // \"This is how it ends!\"\n * ```\n *\n * ### Use forkJoin with operator emitting after some time\n * ```javascript\n * import { forkJoin, interval } from 'rxjs';\n * import { take } from 'rxjs/operators';\n *\n * const observable = forkJoin(\n * interval(1000).pipe(take(3)), // emit 0, 1, 2 every second and complete\n * interval(500).pipe(take(4)), // emit 0, 1, 2, 3 every half a second and complete\n * );\n * observable.subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('This is how it ends!'),\n * );\n *\n * // Logs:\n * // [2, 3] after 3 seconds\n * // \"This is how it ends!\" immediately after\n * ```\n *\n * ### Use forkJoin with project function\n * ```javascript\n * import { forkJoin, interval } from 'rxjs';\n * import { take } from 'rxjs/operators';\n *\n * const observable = forkJoin(\n * interval(1000).pipe(take(3)), // emit 0, 1, 2 every second and complete\n * interval(500).pipe(take(4)), // emit 0, 1, 2, 3 every half a second and complete\n * ).pipe(\n * map(([n, m]) => n + m),\n * );\n * observable.subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('This is how it ends!'),\n * );\n *\n * // Logs:\n * // 5 after 3 seconds\n * // \"This is how it ends!\" immediately after\n * ```\n *\n * @see {@link combineLatest}\n * @see {@link zip}\n *\n * @param {...ObservableInput} sources Any number of Observables provided either as an array or as an arguments\n * passed directly to the operator.\n * @param {function} [project] Function that takes values emitted by input Observables and returns value\n * that will appear in resulting Observable instead of default array.\n * @return {Observable} Observable emitting either an array of last values emitted by passed Observables\n * or value from project function.\n */\nexport function forkJoin(\n ...sources: Array | ObservableInput[] | Function>\n): Observable {\n\n let resultSelector: Function;\n if (typeof sources[sources.length - 1] === 'function') {\n // DEPRECATED PATH\n resultSelector = sources.pop() as Function;\n }\n\n // if the first and only other argument is an array\n // assume it's been called with `forkJoin([obs1, obs2, obs3])`\n if (sources.length === 1 && isArray(sources[0])) {\n sources = sources[0] as Array>;\n }\n\n if (sources.length === 0) {\n return EMPTY;\n }\n\n if (resultSelector) {\n // DEPRECATED PATH\n return forkJoin(sources).pipe(\n map(args => resultSelector(...args))\n );\n }\n\n return new Observable(subscriber => {\n return new ForkJoinSubscriber(subscriber, sources as Array>);\n });\n}\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass ForkJoinSubscriber extends OuterSubscriber {\n private completed = 0;\n private values: T[];\n private haveValues = 0;\n\n constructor(destination: Subscriber,\n private sources: Array>) {\n super(destination);\n\n const len = sources.length;\n this.values = new Array(len);\n\n for (let i = 0; i < len; i++) {\n const source = sources[i];\n const innerSubscription = subscribeToResult(this, source, null, i);\n\n if (innerSubscription) {\n this.add(innerSubscription);\n }\n }\n }\n\n notifyNext(outerValue: any, innerValue: T,\n outerIndex: number, innerIndex: number,\n innerSub: InnerSubscriber): void {\n this.values[outerIndex] = innerValue;\n if (!(innerSub as any)._hasValue) {\n (innerSub as any)._hasValue = true;\n this.haveValues++;\n }\n }\n\n notifyComplete(innerSub: InnerSubscriber): void {\n const { destination, haveValues, values } = this;\n const len = values.length;\n\n if (!(innerSub as any)._hasValue) {\n destination.complete();\n return;\n }\n\n this.completed++;\n\n if (this.completed !== len) {\n return;\n }\n\n if (haveValues === len) {\n destination.next(values);\n }\n\n destination.complete();\n }\n}\n"},"lineCount":null}},"hash":"0ec4b9404629e4afc96d5ac7912ba223","cacheData":{"env":{}}}