{"id":"iB53","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/skipLast.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/operators/skipLast.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/operators/skipLast.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/tslib/tslib.es6.js"},{"name":"../Subscriber","loc":{"line":3,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/skipLast.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Subscriber.js"},{"name":"../util/ArgumentOutOfRangeError","loc":{"line":4,"column":40},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/operators/skipLast.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js"}],"generated":{"js":"\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.skipLast=i;var t=n(require(\"tslib\")),r=require(\"../Subscriber\"),e=require(\"../util/ArgumentOutOfRangeError\");function n(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,e):{};n.get||n.set?Object.defineProperty(r,e,n):r[e]=t[e]}return r.default=t,r}function i(t){return function(r){return r.lift(new u(t))}}var u=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new e.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new r.Subscriber(t)):e.subscribe(new o(t,this._skipCount))},t}(),o=function(r){function e(t,e){var n=r.call(this,t)||this;return n._skipCount=e,n._count=0,n._ring=new Array(e),n}return t.__extends(e,r),e.prototype._next=function(t){var r=this._skipCount,e=this._count++;if(e console.log(x));\n *\n * // Results in:\n * // 1 2 3\n * ```\n *\n * @see {@link skip}\n * @see {@link skipUntil}\n * @see {@link skipWhile}\n * @see {@link take}\n *\n * @throws {ArgumentOutOfRangeError} When using `skipLast(i)`, it throws\n * ArgumentOutOrRangeError if `i < 0`.\n *\n * @param {number} count Number of elements to skip from the end of the source Observable.\n * @returns {Observable} An Observable that skips the last count values\n * emitted by the source Observable.\n * @method skipLast\n * @owner Observable\n */\nexport function skipLast(count: number): MonoTypeOperatorFunction {\n return (source: Observable) => source.lift(new SkipLastOperator(count));\n}\n\nclass SkipLastOperator implements Operator {\n constructor(private _skipCount: number) {\n if (this._skipCount < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n\n call(subscriber: Subscriber, source: any): TeardownLogic {\n if (this._skipCount === 0) {\n // If we don't want to skip any values then just subscribe\n // to Subscriber without any further logic.\n return source.subscribe(new Subscriber(subscriber));\n } else {\n return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));\n }\n }\n}\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nclass SkipLastSubscriber extends Subscriber {\n private _ring: T[];\n private _count: number = 0;\n\n constructor(destination: Subscriber, private _skipCount: number) {\n super(destination);\n this._ring = new Array(_skipCount);\n }\n\n protected _next(value: T): void {\n const skipCount = this._skipCount;\n const count = this._count++;\n\n if (count < skipCount) {\n this._ring[count] = value;\n } else {\n const currentIndex = count % skipCount;\n const ring = this._ring;\n const oldValue = ring[currentIndex];\n\n ring[currentIndex] = value;\n this.destination.next(oldValue);\n }\n }\n}\n"},"lineCount":null}},"hash":"f41705f1cbe827e68d5b0d264f741f2e","cacheData":{"env":{}}}