{"id":"I8KM","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Subscription.js.map","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/src/internal/Subscription.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":"./util/isArray","loc":{"line":2,"column":24},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Subscription.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/isArray.js"},{"name":"./util/isObject","loc":{"line":3,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Subscription.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/isObject.js"},{"name":"./util/isFunction","loc":{"line":4,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Subscription.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/isFunction.js"},{"name":"./util/tryCatch","loc":{"line":5,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Subscription.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/tryCatch.js"},{"name":"./util/errorObject","loc":{"line":6,"column":28},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Subscription.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/errorObject.js"},{"name":"./util/UnsubscriptionError","loc":{"line":7,"column":36},"parent":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/Subscription.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/webdetector/node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js"}],"generated":{"js":"\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0}),exports.Subscription=void 0;var r=require(\"./util/isArray\"),t=require(\"./util/isObject\"),i=require(\"./util/isFunction\"),e=require(\"./util/tryCatch\"),s=require(\"./util/errorObject\"),n=require(\"./util/UnsubscriptionError\"),o=function(){function o(r){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,r&&(this._unsubscribe=r)}var c;return o.prototype.unsubscribe=function(){var o,c=!1;if(!this.closed){var a=this._parent,p=this._parents,b=this._unsubscribe,h=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var l=-1,f=p?p.length:0;a;)a.remove(this),a=++l void) {\n if (unsubscribe) {\n ( this)._unsubscribe = unsubscribe;\n }\n }\n\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n */\n unsubscribe(): void {\n let hasErrors = false;\n let errors: any[];\n\n if (this.closed) {\n return;\n }\n\n let { _parent, _parents, _unsubscribe, _subscriptions } = ( this);\n\n this.closed = true;\n this._parent = null;\n this._parents = null;\n // null out _subscriptions first so any child subscriptions that attempt\n // to remove themselves from this subscription will noop\n this._subscriptions = null;\n\n let index = -1;\n let len = _parents ? _parents.length : 0;\n\n // if this._parent is null, then so is this._parents, and we\n // don't have to remove ourselves from any parent subscriptions.\n while (_parent) {\n _parent.remove(this);\n // if this._parents is null or index >= len,\n // then _parent is set to null, and the loop exits\n _parent = ++index < len && _parents[index] || null;\n }\n\n if (isFunction(_unsubscribe)) {\n let trial = tryCatch(_unsubscribe).call(this);\n if (trial === errorObject) {\n hasErrors = true;\n errors = errors || (\n errorObject.e instanceof UnsubscriptionError ?\n flattenUnsubscriptionErrors(errorObject.e.errors) : [errorObject.e]\n );\n }\n }\n\n if (isArray(_subscriptions)) {\n\n index = -1;\n len = _subscriptions.length;\n\n while (++index < len) {\n const sub = _subscriptions[index];\n if (isObject(sub)) {\n let trial = tryCatch(sub.unsubscribe).call(sub);\n if (trial === errorObject) {\n hasErrors = true;\n errors = errors || [];\n let err = errorObject.e;\n if (err instanceof UnsubscriptionError) {\n errors = errors.concat(flattenUnsubscriptionErrors(err.errors));\n } else {\n errors.push(err);\n }\n }\n }\n }\n }\n\n if (hasErrors) {\n throw new UnsubscriptionError(errors);\n }\n }\n\n /**\n * Adds a tear down to be called during the unsubscribe() of this\n * Subscription.\n *\n * If the tear down being added is a subscription that is already\n * unsubscribed, is the same reference `add` is being called on, or is\n * `Subscription.EMPTY`, it will not be added.\n *\n * If this subscription is already in an `closed` state, the passed\n * tear down logic will be executed immediately.\n *\n * @param {TeardownLogic} teardown The additional logic to execute on\n * teardown.\n * @return {Subscription} Returns the Subscription used or created to be\n * added to the inner subscriptions list. This Subscription can be used with\n * `remove()` to remove the passed teardown logic from the inner subscriptions\n * list.\n */\n add(teardown: TeardownLogic): Subscription {\n if (!teardown || (teardown === Subscription.EMPTY)) {\n return Subscription.EMPTY;\n }\n\n if (teardown === this) {\n return this;\n }\n\n let subscription = ( teardown);\n\n switch (typeof teardown) {\n case 'function':\n subscription = new Subscription(<(() => void) > teardown);\n case 'object':\n if (subscription.closed || typeof subscription.unsubscribe !== 'function') {\n return subscription;\n } else if (this.closed) {\n subscription.unsubscribe();\n return subscription;\n } else if (typeof subscription._addParent !== 'function' /* quack quack */) {\n const tmp = subscription;\n subscription = new Subscription();\n subscription._subscriptions = [tmp];\n }\n break;\n default:\n throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n }\n\n const subscriptions = this._subscriptions || (this._subscriptions = []);\n\n subscriptions.push(subscription);\n subscription._addParent(this);\n\n return subscription;\n }\n\n /**\n * Removes a Subscription from the internal list of subscriptions that will\n * unsubscribe during the unsubscribe process of this Subscription.\n * @param {Subscription} subscription The subscription to remove.\n * @return {void}\n */\n remove(subscription: Subscription): void {\n const subscriptions = this._subscriptions;\n if (subscriptions) {\n const subscriptionIndex = subscriptions.indexOf(subscription);\n if (subscriptionIndex !== -1) {\n subscriptions.splice(subscriptionIndex, 1);\n }\n }\n }\n\n /** @internal */\n private _addParent(parent: Subscription) {\n let { _parent, _parents } = this;\n if (!_parent || _parent === parent) {\n // If we don't have a parent, or the new parent is the same as the\n // current parent, then set this._parent to the new parent.\n this._parent = parent;\n } else if (!_parents) {\n // If there's already one parent, but not multiple, allocate an Array to\n // store the rest of the parent Subscriptions.\n this._parents = [parent];\n } else if (_parents.indexOf(parent) === -1) {\n // Only add the new parent to the _parents list if it's not already there.\n _parents.push(parent);\n }\n }\n}\n\nfunction flattenUnsubscriptionErrors(errors: any[]) {\n return errors.reduce((errs, err) => errs.concat((err instanceof UnsubscriptionError) ? err.errors : err), []);\n}\n"},"lineCount":null}},"hash":"614b797ea66ce2476c6f0096cba120b8","cacheData":{"env":{}}}