{"map":"{\"version\":3,\"file\":\"MemorylessIndefiniteSubject.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/observables/MemorylessIndefiniteSubject.ts\"],\"names\":[],\"mappings\":\"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,OAAO,gBAAgB,MAAM,6CAA6C,CAAC;AAS3E;;;;GAIG;AACH,MAAM;IAAN;QACE,6EAA6E;QAC7E,yEAAyE;QACzE,eAAU,GAAqB,IAAI,GAAG,EAAE,CAAC;IA0C3C,CAAC;IAxCC;;OAEG;IACH,IAAI,CAAC,KAAQ;QACX,qEAAqE;QACrE,0EAA0E;QAC1E,YAAY;QACZ,IAAI,CAAC,UAAU,CAAC,OAAO,CACrB,CAAC,QAAqB,KAAK,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAChD,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,cAAiC;QACzC,MAAM,QAAQ,GAAG,gBAAgB,CAAI,cAAc,CAAC,CAAC;QAErD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAE9B,MAAM,CAAC;YACL,WAAW,EAAE;gBACX,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACnC,CAAC;SACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,CAAC,YAAY,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;CACF;AACD,eAAe,2BAA2B,CAAC\"}","code":"/** @license\r\n *  Copyright 2016 - present The Material Motion Authors. All Rights Reserved.\r\n *\r\n *  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n *  use this file except in compliance with the License. You may obtain a copy\r\n *  of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n *  Unless required by applicable law or agreed to in writing, software\r\n *  distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n *  License for the specific language governing permissions and limitations\r\n *  under the License.\r\n */\r\nimport $$observable from 'symbol-observable';\r\nimport wrapWithObserver from 'indefinite-observable/dist/wrapWithObserver';\r\n/**\r\n * A `MemorylessIndefiniteSubject` is both an `Observer` and an `Observable`.\r\n * Whenever it receives a value on `next`, it forwards that value to any\r\n * subscribed observers.\r\n */\r\nexport class MemorylessIndefiniteSubject {\r\n    constructor() {\r\n        // Keep track of all the observers who have subscribed, so we can notify them\r\n        // when we get new values.  Note: JavaScript's Set collection is ordered.\r\n        this._observers = new Set();\r\n    }\r\n    /**\r\n     * Passes the supplied value to any currently-subscribed observers.\r\n     */\r\n    next(value) {\r\n        // The parent stream has emitted a value, so pass it along to all the\r\n        // children, and cache it for any observers that subscribe before the next\r\n        // emission.\r\n        this._observers.forEach((observer) => observer.next(value));\r\n    }\r\n    /**\r\n     * `subscribe` accepts either a function, or an object with a `next` method.\r\n     * `subject.next` will forward any value it receives to the function or method\r\n     * provided here.\r\n     *\r\n     * Call the returned `unsubscribe` method to stop receiving values on this\r\n     * particular observer.\r\n     */\r\n    subscribe(observerOrNext) {\r\n        const observer = wrapWithObserver(observerOrNext);\r\n        this._observers.add(observer);\r\n        return {\r\n            unsubscribe: () => {\r\n                this._observers.delete(observer);\r\n            }\r\n        };\r\n    }\r\n    /**\r\n     * Tells other libraries that know about observables that we are one.\r\n     *\r\n     * https://github.com/tc39/proposal-observable#observable\r\n     */\r\n    [$$observable]() {\r\n        return this;\r\n    }\r\n}\r\nexport default MemorylessIndefiniteSubject;\r\n//# sourceMappingURL=MemorylessIndefiniteSubject.js.map","dts":{"name":"/Users/brentons/Projects/material-motion-js/packages/core/observables/MemorylessIndefiniteSubject.d.ts","text":"import { Observable, Observer, ObserverOrNext, Subscription } from 'indefinite-observable';\r\n/**\r\n * A `MemorylessIndefiniteSubject` is both an `Observer` and an `Observable`.\r\n * Whenever it receives a value on `next`, it forwards that value to any\r\n * subscribed observers.\r\n */\r\nexport declare class MemorylessIndefiniteSubject<T> implements Observable<T>, Observer<T> {\r\n    _observers: Set<Observer<T>>;\r\n    /**\r\n     * Passes the supplied value to any currently-subscribed observers.\r\n     */\r\n    next(value: T): void;\r\n    /**\r\n     * `subscribe` accepts either a function, or an object with a `next` method.\r\n     * `subject.next` will forward any value it receives to the function or method\r\n     * provided here.\r\n     *\r\n     * Call the returned `unsubscribe` method to stop receiving values on this\r\n     * particular observer.\r\n     */\r\n    subscribe(observerOrNext: ObserverOrNext<T>): Subscription;\r\n}\r\nexport default MemorylessIndefiniteSubject;\r\n"}}
