(points)
| 1620 | } |
| 1621 | |
| 1622 | function uniqueUnitPoints(points) { |
| 1623 | const seen = new Set(); |
| 1624 | const unique = []; |
| 1625 | for (const point of points) { |
| 1626 | if (!Number.isFinite(point.x) || !Number.isFinite(point.y)) { |
| 1627 | continue; |
| 1628 | } |
| 1629 | const rounded = { |
| 1630 | x: Math.max(0, Math.min(1, Number(point.x.toFixed(4)))), |
| 1631 | y: Math.max(0, Math.min(1, Number(point.y.toFixed(4)))), |
| 1632 | }; |
| 1633 | const key = `${rounded.x},${rounded.y}`; |
| 1634 | if (!seen.has(key)) { |
| 1635 | seen.add(key); |
| 1636 | unique.push(rounded); |
| 1637 | } |
| 1638 | } |
| 1639 | return unique; |
| 1640 | } |
| 1641 | |
| 1642 | function looksLikeOpenUrlPrompt(snapshot) { |
| 1643 | return ( |
no test coverage detected