# Telegram Web A animation source

Upstream: [Ajaxy/telegram-tt](https://github.com/Ajaxy/telegram-tt), the official
Telegram Web A client linked from [Telegram Apps](https://telegram.org/apps).
Pinned commit: `28ffcf710b15571e5a2f7bb3bdce3fc90fc8ec80`.

- Original: [src/util/animation.ts](https://github.com/Ajaxy/telegram-tt/blob/28ffcf710b15571e5a2f7bb3bdce3fc90fc8ec80/src/util/animation.ts)
- License: [LICENSE](https://github.com/Ajaxy/telegram-tt/blob/28ffcf710b15571e5a2f7bb3bdce3fc90fc8ec80/LICENSE), GPL version 3.
- `upstream-animation.ts` is the complete, unmodified source, preserved for audit.
- `LICENSE` is the complete, unmodified upstream license text.
- Source SHA-256: `1e7128581d1f83339f74d33b6de98f0ca15b82404c3da9e2b9dca4a4b751ac6d` (3,301 bytes).
- License SHA-256: `e1c0ad728983d8a57335e52cf1064f1affd1d454173d8cebd3ed8b4a72b48704` (35,121 bytes).
- The source file contains no additional copyright header. Attribution is to
  Ajaxy and the Telegram Web A contributors; no individual authorship is invented.

Modified by EssayPilot on 2026-10-02. `animation.mjs` extracts `animateInstantly`,
`animateNumber`, and three timing functions. Changes: strip TypeScript and
Fasterdom import, inject browser RAF/cancellation/clock, support a zero duration,
pause/resume/finish and idempotent completion, and cancel queued RAF callbacks.
The original immediate tick recursion and scalar/vector interpolation are used
in the running sidebar, not merely retained as an unused reference.

`motion.mjs` adapts this driver to EssayPilot's existing DOM/WAAPI presentation:
sidebar state stays owned by global-tools; popup focus/hidden state is immediate,
while inert visual exit copies use sampled current frames and reverse safely.
No Teact framework, Telegram assets, chat state, network code, or API is imported.

This derived code is GPL-3.0 and is distributed WITHOUT ANY WARRANTY. The front
end's source distribution and notices are managed by the root project, not this
directory. Do not remove the upstream snapshot, license, or modification notice.
