{"map":"{\"version\":3,\"file\":\"convertTouchEventsToPointerEvents.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/dom/convertTouchEventsToPointerEvents.ts\"],\"names\":[],\"mappings\":\"AAAA;;;;;;;;;;;;;;GAcG;AAQH,mFAAmF;AACnF,+DAA+D;AAC/D,MAAM,0BAA0B,GAAiB;IAC/C,YAAY,EAAE,aAAa;IAC3B,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,WAAW;IACvB,aAAa,EAAE,eAAe;CAC/B,CAAC;AAEF,MAAM,4CAA4C,WAAsD;IACtG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;QACtB,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,cAAc,EAAc,KAAK,KAAK,CAAC,IAAI,CAC5E,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;cACtC,cAAc;cACd,aAAa,EACjB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAS,KAAK,CAC3C;YACE,kEAAkE;YAClE,2DAA2D;YAC3D,CAAC,EAAE,OAAO;YACV,CAAC,EAAE,OAAO;YACV,SAAS,EAAE,UAAU;YACrB,IAAI,EAAE,0BAA0B,CAAC,IAAI,CAAC;SACvC,CACF,CACF;KACF,CAAC,CAAC,iBAAiB,EAAuB,CAAC;AAC9C,CAAC;AACD,eAAe,iCAAiC,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\n// TouchEvent types from https://developer.apple.com/reference/webkitjs/touchevent/\r\n// PointerEvent types from https://w3c.github.io/pointerevents/\r\nconst TOUCH_TYPE_TO_POINTER_TYPE = {\r\n    'touchstart': 'pointerdown',\r\n    'touchmove': 'pointermove',\r\n    'touchend': 'pointerup',\r\n    'touchcancel': 'pointercancel',\r\n};\r\nexport function convertTouchEventsToPointerEvents(touchEvent$) {\r\n    return touchEvent$._map({\r\n        transform: ({ type, targetTouches, changedTouches }) => Array.from(['touchend', 'touchcancel'].includes(type)\r\n            ? changedTouches\r\n            : targetTouches, ({ clientX, clientY, identifier }) => ({\r\n            // `PointerEvent` defines `x` and `y` as aliases for `clientX` and\r\n            // `clientY`, but `TouchEvent` doesn't have the same sugar.\r\n            x: clientX,\r\n            y: clientY,\r\n            pointerId: identifier,\r\n            type: TOUCH_TYPE_TO_POINTER_TYPE[type]\r\n        }))\r\n    })._flattenIterables();\r\n}\r\nexport default convertTouchEventsToPointerEvents;\r\n//# sourceMappingURL=convertTouchEventsToPointerEvents.js.map","dts":{"name":"/Users/brentons/Projects/material-motion-js/packages/core/dom/convertTouchEventsToPointerEvents.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 { ObservableWithMotionOperators, PartialPointerEvent } from '../types';\r\nexport declare function convertTouchEventsToPointerEvents(touchEvent$: ObservableWithMotionOperators<TouchEvent>): ObservableWithMotionOperators<PartialPointerEvent>;\r\nexport default convertTouchEventsToPointerEvents;\r\n"}}
