{"map":"{\"version\":3,\"file\":\"_filter.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/operators/foundation/_filter.ts\"],\"names\":[],\"mappings\":\"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EACL,SAAS,GACV,MAAM,kBAAkB,CAAC;AAU1B,MAAM,qBAAsE,UAAa;IACvF,MAAM,CAAC,KAAM,SAAQ,UAAU;QAC7B;;;;;;WAMG;QACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,KAAqB,EAAE;YACpD,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;gBACxB,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE;oBACpC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;wBACxB,IAAI,CAAC,QAAQ,CAAC,CAAC;oBACjB,CAAC;gBACH,CAAC;aACF,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,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 { isDefined, } from '../../typeGuards';\r\nexport function withFilter(superclass) {\r\n    return class extends superclass {\r\n        /**\r\n         * Checks every incoming value with `predicate` and synchronously passes\r\n         * values that return `true` to the observer.\r\n         *\r\n         * If `predicate` is not supplied, `_filter` will pass through any value\r\n         * that is not `undefined`.\r\n         */\r\n        _filter({ predicate = isDefined } = {}) {\r\n            return this._nextOperator({\r\n                operation: ({ emit }) => ({ upstream }) => {\r\n                    if (predicate(upstream)) {\r\n                        emit(upstream);\r\n                    }\r\n                }\r\n            });\r\n        }\r\n    };\r\n}\r\n//# sourceMappingURL=_filter.js.map","dts":{"name":"/Users/brentons/Projects/material-motion-js/packages/core/operators/foundation/_filter.d.ts","text":"/** @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 { Constructor, MotionNextOperable, ObservableWithMotionOperators, Predicate } from '../../types';\r\nexport declare type _FilterArgs<T> = {\r\n    predicate?: Predicate<T>;\r\n};\r\nexport interface MotionFilterable<T> {\r\n    _filter(kwargs?: _FilterArgs<T>): ObservableWithMotionOperators<T>;\r\n}\r\nexport declare function withFilter<T, S extends Constructor<MotionNextOperable<T>>>(superclass: S): S & Constructor<MotionFilterable<T>>;\r\n"}}
