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CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACpE,CAAC;AAED;;GAEG;AACH,MAAM,qBAAqB,KAAU;IACnC,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,SAAS,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,wBAAwB,KAAU;IACtC,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AACpD,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\n/**\r\n * Checks if an object is a Boolean.\r\n */\r\nexport function isBoolean(value) {\r\n    return typeof value === 'boolean';\r\n}\r\n/**\r\n * Checks if an object is not undefined.\r\n */\r\nexport function isDefined(value) {\r\n    return typeof value !== 'undefined';\r\n}\r\n/**\r\n * Checks if an object has numeric values for both `width` and `height`.\r\n */\r\nexport function isDimensions(value) {\r\n    return typeof value.width === 'number' && typeof value.height === 'number';\r\n}\r\n/**\r\n * Checks if an object is a Number.\r\n */\r\nexport function isNumber(value) {\r\n    return typeof value === 'number';\r\n}\r\n/**\r\n * Checks if an object is an observable by checking if it returns itself from\r\n * [Symbol.observable]()\r\n */\r\nexport function isObservable(value) {\r\n    return value && value[$$observable] && value === value[$$observable]();\r\n}\r\n/**\r\n * Checks if an object is a `Map` using `instanceof`.\r\n */\r\nexport function isMap(value) {\r\n    return value instanceof Map;\r\n}\r\n/**\r\n * Checks if an object has numeric values for both `x` and `y`.\r\n */\r\nexport function isPoint2D(value) {\r\n    return typeof value.x === 'number' && typeof value.y === 'number';\r\n}\r\n/**\r\n * Checks if a value is an `Observer` by checking if the value has a `next`\r\n * method.\r\n */\r\nexport function isObserver(value) {\r\n    return typeof value.next === 'function';\r\n}\r\n/**\r\n * Checks if a value is a `PointerEvent` by checking if the value is an `Event`\r\n * whose `type` starts with `pointer`.\r\n *\r\n * This is useful for ensuring that `downEvent.target.setPointerCapture()` can\r\n * be called:  To avoid using the PointerEvent polyfill, a developer could\r\n * create an object that had the subset of `PointerEvent` that we care about\r\n * (`PartialPointerEvent`) and populate its values from `event.targetTouches`.\r\n * However, we only need to call `setPointerCapture()` on a true `PointerEvent`,\r\n * so `isPointerEvent(value)` needs to be able to distinguish between them.\r\n */\r\nexport function isPointerEvent(value) {\r\n    return value instanceof Event && value.type.startsWith('pointer');\r\n}\r\n/**\r\n * Checks if value is iterable; that is, usable in a `for of` loop.\r\n */\r\nexport function isIterable(value) {\r\n    return value && value[Symbol.iterator] !== undefined;\r\n}\r\n/**\r\n * Checks if value has a timestamp property.\r\n */\r\nexport function isTimestamped(value) {\r\n    return value && value.hasOwnProperty('timestamp');\r\n}\r\n//# sourceMappingURL=typeGuards.js.map","dts":{"name":"/Users/brentons/Projects/material-motion-js/packages/core/typeGuards.d.ts","text":"import { Dimensions, Observable, Observer, Point2D, Timestamped } from './types';\r\n/**\r\n * Checks if an object is a Boolean.\r\n */\r\nexport declare function isBoolean(value: any): value is boolean;\r\n/**\r\n * Checks if an object is not undefined.\r\n */\r\nexport declare function isDefined(value: any): boolean;\r\n/**\r\n * Checks if an object has numeric values for both `width` and `height`.\r\n */\r\nexport declare function isDimensions(value: any): value is Dimensions;\r\n/**\r\n * Checks if an object is a Number.\r\n */\r\nexport declare function isNumber(value: any): value is number;\r\n/**\r\n * Checks if an object is an observable by checking if it returns itself from\r\n * [Symbol.observable]()\r\n */\r\nexport declare function isObservable(value: any): value is Observable<any>;\r\n/**\r\n * Checks if an object is a `Map` using `instanceof`.\r\n */\r\nexport declare function isMap(value: any): value is Map<any, any>;\r\n/**\r\n * Checks if an object has numeric values for both `x` and `y`.\r\n */\r\nexport declare function isPoint2D(value: any): value is Point2D;\r\n/**\r\n * Checks if a value is an `Observer` by checking if the value has a `next`\r\n * method.\r\n */\r\nexport declare function isObserver<T = any>(value: any): value is Observer<T>;\r\n/**\r\n * Checks if a value is a `PointerEvent` by checking if the value is an `Event`\r\n * whose `type` starts with `pointer`.\r\n *\r\n * This is useful for ensuring that `downEvent.target.setPointerCapture()` can\r\n * be called:  To avoid using the PointerEvent polyfill, a developer could\r\n * create an object that had the subset of `PointerEvent` that we care about\r\n * (`PartialPointerEvent`) and populate its values from `event.targetTouches`.\r\n * However, we only need to call `setPointerCapture()` on a true `PointerEvent`,\r\n * so `isPointerEvent(value)` needs to be able to distinguish between them.\r\n */\r\nexport declare function isPointerEvent(value: any): value is PointerEvent;\r\n/**\r\n * Checks if value is iterable; that is, usable in a `for of` loop.\r\n */\r\nexport declare function isIterable(value: any): value is Iterable<any>;\r\n/**\r\n * Checks if value has a timestamp property.\r\n */\r\nexport declare function isTimestamped(value: any): value is Timestamped<any>;\r\n"}}
